// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.

// This code was generated by google-apis-code-generator 1.5.1

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   Calendar API (calendar/v3)
// Generated from:
//   Version: v3
//   Revision: 20171010
// Generated by:
//    Tool: google-apis-code-generator 1.5.1
//     C++: 0.1.5
#ifndef  GOOGLE_CALENDAR_API_EVENT_REMINDER_H_
#define  GOOGLE_CALENDAR_API_EVENT_REMINDER_H_

#include <string>
#include "googleapis/base/integral_types.h"
#include "googleapis/base/macros.h"
#include "googleapis/client/data/jsoncpp_data.h"
#include "googleapis/strings/stringpiece.h"

namespace Json {
class Value;
}  // namespace Json

namespace google_calendar_api {
using namespace googleapis;

/**
 * No description provided.
 *
 * @ingroup DataObject
 */
class EventReminder : public client::JsonCppData {
 public:
  /**
   * Creates a new default instance.
   *
   * @return Ownership is passed back to the caller.
   */
  static EventReminder* New();

  /**
   * Standard constructor for an immutable data object instance.
   *
   * @param[in] storage  The underlying data storage for this instance.
   */
  explicit EventReminder(const Json::Value& storage);

  /**
   * Standard constructor for a mutable data object instance.
   *
   * @param[in] storage  The underlying data storage for this instance.
   */
  explicit EventReminder(Json::Value* storage);

  /**
   * Standard destructor.
   */
  virtual ~EventReminder();

  /**
   * Returns a string denoting the type of this data object.
   *
   * @return <code>google_calendar_api::EventReminder</code>
   */
  const char* GetTypeName() const {
    return "google_calendar_api::EventReminder";
  }

  /**
   * Determine if the '<code>method</code>' attribute was set.
   *
   * @return true if the '<code>method</code>' attribute was set.
   */
  bool has_method() const {
    return Storage().isMember("method");
  }

  /**
   * Clears the '<code>method</code>' attribute.
   */
  void clear_method() {
    MutableStorage()->removeMember("method");
  }


  /**
   * Get the value of the '<code>method</code>' attribute.
   */
  const StringPiece get_method() const {
    const Json::Value& v = Storage("method");
    if (v == Json::Value::null) return StringPiece("");
    return StringPiece(v.asCString());
  }

  /**
   * Change the '<code>method</code>' attribute.
   *
   * The method used by this reminder. Possible values are:
   * <dl>
   * <dt>"email"
   * <dd>Reminders are sent via email.
   * <dt>"sms"
   * <dd>Reminders are sent via SMS. These are only available for G Suite
   * customers. Requests to set SMS reminders for other account types are
   * ignored.
   * <dt>"popup"
   * <dd>Reminders are sent via a UI popup.
   * </dl>
   *
   *
   * @param[in] value The new value.
   */
  void set_method(const StringPiece& value) {
    *MutableStorage("method") = value.data();
  }

  /**
   * Determine if the '<code>minutes</code>' attribute was set.
   *
   * @return true if the '<code>minutes</code>' attribute was set.
   */
  bool has_minutes() const {
    return Storage().isMember("minutes");
  }

  /**
   * Clears the '<code>minutes</code>' attribute.
   */
  void clear_minutes() {
    MutableStorage()->removeMember("minutes");
  }


  /**
   * Get the value of the '<code>minutes</code>' attribute.
   */
  int32 get_minutes() const {
    const Json::Value& storage = Storage("minutes");
    return client::JsonValueToCppValueHelper<int32 >(storage);
  }

  /**
   * Change the '<code>minutes</code>' attribute.
   *
   * Number of minutes before the start of the event when the reminder should
   * trigger. Valid values are between 0 and 40320 (4 weeks in minutes).
   *
   * @param[in] value The new value.
   */
  void set_minutes(int32 value) {
    client::SetJsonValueFromCppValueHelper<int32 >(
      value, MutableStorage("minutes"));
  }

 private:
  void operator=(const EventReminder&);
};  // EventReminder
}  // namespace google_calendar_api
#endif  // GOOGLE_CALENDAR_API_EVENT_REMINDER_H_
